package com.example;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;

public class ParasJWT {
    public static void main(String[] args) {
        String token="eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI4ODYiLCJzdWIiOiJhc21pbiIsImlhdCI6MTY0OTgzMjM5OCwibXluYW1lIjoidG9tIiwibXlhZ2UiOiIxOCJ9._MeCnZZYfmdFqSmfTXd2ZnW22JurdmL8DztxjRSqvO0";
        Claims claims= Jwts.parser().setSigningKey("woniu").parseClaimsJws(token).getBody();
        System.out.println(claims.getId());
        System.out.println(claims.getSubject());
        System.out.println(claims.getIssuedAt());
        System.out.println(claims.get("myname"));
        System.out.println(claims.get("myage"));
    }
}
